home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan
/
Opus 5 - Magellan.iso
/
Extras
/
NewIconsV3.1upd
/
newicon.doc
next >
Wrap
Text File
|
1996-08-22
|
6KB
|
196 lines
TABLE OF CONTENTS
newicon.library/GetNewDiskObject
newicon.library/PutNewDiskObject
newicon.library/FreeNewDiskObject
newicon.library/RemapChunkyImage
newicon.library/FreeRemappedImage
GetNewDiskObject GetNewDiskObject
NAME
GetNewDiskObject() -- Read a disk object, with NewIcons support.
SYNOPSIS
newdiskobj = GetNewDiskObject(name)
D0 A0
struct NewDiskObject *GetNewDiskObject(char *);
FUNCTION
Pretty much like the standard icon.library GetDiskObject() call.
It will read the Workbench disk object specified in the name parameter,
adding the ".info" suffix itself, and return a filled NewDiskObject
structure. If the call fails, it returns zero. The reason for the
failure can be obtained by calling IoError().
This routine can be used if you wish to obtain a standard diskobject,
with separate pointers to NewIcons chunky data if there's NewIcons
imageries present in the loaded disk object.
Once finished with it, you must use FreeNewDiskObject() to free the
memory that was allocated for it.
INPUTS
name -- The name (* char) of the object (without the ".info" suffix).
RESULT
newdiskobj -- a filled NewDiskObject structure. You must call
FreeNewDiskObject() once you're done with it.
SEE ALSO
newicon.library/FreeNewDiskObject(), newicon.library/RemapChunkyData(),
icon.library/GetDiskObject()
PutNewDiskObject PutNewDiskObject
NAME
PutNewDiskObject() -- write a NewDiskObject to disk.
SYNOPSIS
status = PutNewDiskObject(name, newdiskobj)
D0 A0 A1
BOOL PutNewDiskObject(char *, struct NewDiskObject);
FUNCTION
Pretty much like the standard icon.library PutDiskObject() call.
This routine will write a NewDiskObject structure and its related
information to disk as a standard icon, encoding the chunky data
(if present in the structure) as NewIcons tooltypes in the process.
The filename of the info file is specified as the name parameter,
which will automaticaly get the ".info" suffix added. If the call
fails, it returns zero. The reason for the failure can be obtained
by calling IoError().
INPUTS
name -- The name (* char) of the object (without the ".info" suffix).
newdiskobj -- A pointer to a NewDiskObject structure.
RESULT
status -- TRUE if the call was successfull, else FALSE.
SEE ALSO
newicon.library/FreeNewDiskObject(),
newicon.library/GetNewDiskObject(), icon.library/PutDiskObject()
FreeNewDiskObject GreeNewDiskObject
NAME
FreeNewDiskObject() -- Free all memory allocated in a NewDiskObject.
SYNOPSIS
FreeNewDiskObject(newdiskobj)
A0
VOID FreeNewDiskObject(struct NewDiskObject *);
FUNCTION
Pretty much like the standard icon.library FreeDiskObject() call.
It will deallocate any memory allocated for a NewDiskObject, and
the object itself. This is the ONLY way to deallocate a NewDiskObject
structure that has been allocated by GetNewDiskObject().
INPUTS
newdiskobj -- A pointer to a NewDiskObject structure.
RESULT
None.
SEE ALSO
newicon.library/GetNewDiskObject(), icon.library/FreeDiskObject()
RemapChunkyImage RemapChunkyImage
NAME
RemapChunkyImage() -- Remaps a chunky image to be displayed on screen
SYNOPSIS
image = RemapChunkyImage(chunkyimage, screen)
D0 A0 A1
struct Image RemapChunkyImage(struct ChunkyImage *, struct Screen *)
FUNCTION
Remaps a ChunkyImage to be displayed on a screen. Caller must either
be the owner of the screen, or have locked it. Under KS 3.0 (V39) and
up, it will use ObtainBestPen() if screen has shareable pens.
Otherwise will use the available colors.
The image is returned as an Intuition Image structure, remapped so
chunky data palette match as closely as possible with the target
screen's palette, depending on the precision setting chosen by the
user in the NewIconsPrefs editor, and the available pens.
Once done with your image, you should call FreeRemappedImage() to free
it and any allocated pens.
INPUTS
chunkydata -- A pointer to a ChunkyImage structure.
screen -- A pointer to the destination Screen.
RESULT
Image -- An Intuition Image structure, or NIL if it fails.
NOTES
If the user has enabled the RTG Mode in the NewIconsPrefs, then the
allocated image will be in Fast RAM (if any Fast RAM is available).
SEE ALSO
newicon.library/FreeRemappedImage()
FreeRemappedImage FreeRemappedImage
NAME
FreeRemappedImage() -- Frees a remapped image and its pens.
SYNOPSIS
FreeRemappedImage(image, screen)
A0 A1
VOID RemapChunkyImage(struct Image *, struct Screen *)
FUNCTION
This function frees a remapped image and also frees its pens.
Therefore you must call it only after you are done with the image:
if you call it while it is still displayed on the screen, your image
could see its colors mangled since the pens would be freed.
You must supply a screen argument. It must either be the same
passed to RemapCHunkyImage, or NULL if the screen has been closed
in the meantime.
INPUTS
image -- A pointer to a remapped Image structure.
screen -- A pointer to the Screen for which your ChunkyData was
remapped, or NULL if the screen has been closed since then.
RESULT
None.
SEE ALSO
newicon.library/RemapChunkyImage()